﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AnalysisMenu.ascx.cs" Inherits="UserControls_AnalysisMenu" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>

<link href="../Css/analysisMenu.css" rel="stylesheet" />
<script type="text/javascript">
    function AutoComplete(sender, args) {
        __doPostBack(sender.get_element().name, "");
    }

    function ClickOnLink() {
        $("[id*=HyperLink1]").click()
    }

</script>

<script type="text/javascript" id="CallScript"></script>

<section id="page-content" class="clearfix">

    <div class="info-box colored clearfix margin-bottom-20px">

       <%-- <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>--%>
                <blockquote>
                    <h5>Søg efter selskab</h5>
                    <div class="searchDiv">
                        <!-- Search function -->
                        <div class="nine columns">
                            <asp:TextBox ID="TextBox1" runat="server" CssClass="search" OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
                        </div>
                        <div class="one columns">
                            <asp:Button ID="SearchButton" runat="server" Text="Søg" Visible="true" OnClick="SearchButton_Click" />
                        </div>
                        <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TextBox1" ServicePath="WebService.asmx"
                            CompletionInterval="10" MinimumPrefixLength="1" ServiceMethod="AutoComp" OnClientItemSelected="AutoComplete" CompletionListCssClass="autoCompleteList">
                        </asp:AutoCompleteExtender>
                        <asp:HyperLink ID="HyperLink1" CssClass="fancybox fancybox.iframe" runat="server" />
                        <!-- Search function end -->
                    </div>
                    <div style="height: 20px"></div>
                </blockquote>
        <%--    </ContentTemplate>
            <Triggers>
                
            </Triggers>
        </asp:UpdatePanel>--%>


        <div class="flags">
            <blockquote>
                <h5>Sorter selskaber efter land</h5>
                <div class="row margin-bottom-10px">
                    <div class="one columns">
                        <asp:ImageButton ID="DNK" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Denmark.png" ToolTip="Danske aktier" OnClick="DNK_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">Danmark</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="SWE" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Sweden.png" ToolTip="Svenske aktier" OnClick="SWE_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">Sverige</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="NOW" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Norway.png" ToolTip="Norske aktier" OnClick="NOW_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">Norge</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="GRB" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Greatbritain.png" ToolTip="Britiske aktier" OnClick="GRB_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">UK</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="FIN" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Finland.png" ToolTip="Finske aktier" OnClick="FIN_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">Finland</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="USA" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/USA.png" ToolTip="Amerikanske aktier" OnClick="USA_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">USA</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="NED" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Holland.png" ToolTip="Hollandske aktier" OnClick="NED_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">Holland</h6>
                        </a>
                    </div>
                    <div class="one columns">
                        <asp:ImageButton ID="GER" runat="server" CssClass="thumb scroll" ImageUrl="../images/flags/Germany.png" ToolTip="Tyske aktier" OnClick="GER_Click" />
                        <a href="#">
                            <h6 style="text-align: center;">Tyskland</h6>
                        </a>
                    </div>
                </div>
            </blockquote>
        </div>
    </div>
    <div class="info-box white clearfix margin-bottom-20px">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>


                <div class="eleven columns">
                    <h3>
                        <asp:Label ID="lblCountry" runat="server" Text=""></asp:Label></h3>
                    <div class="gridView">
                        <asp:GridView AutoGenerateColumns="false" ID="GridViewCompanies" runat="server" CssClass="standard"
                            ShowHeader="True" AllowPaging="True" OnPageIndexChanging="GridViewCompanies_PageIndexChanging" OnRowDataBound="GridViewCompanies_RowDataBound">

                            <Columns>
                                <asp:HyperLinkField ControlStyle-CssClass="fancybox fancybox.iframe" DataNavigateUrlFields="id"
                                    DataNavigateUrlFormatString="/Aktieanalyser/Analyse?id={0}"
                                    DataTextField="name" HeaderText="Selskab" />
                            </Columns>
                            <Columns>
                                <asp:BoundField HeaderText="Kurs" ControlStyle-Width="50%" />
                            </Columns>
                        </asp:GridView>
                    </div>


                </div>

            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="DNK" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="SWE" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="NOW" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="GRB" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="FIN" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="USA" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="NED" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="GER" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="GridViewCompanies" EventName="PageIndexChanging" />
            </Triggers>

        </asp:UpdatePanel>
    </div>
</section>
